home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 1997 September & October
/
Amiga-CD 1997 #9-10.iso
/
software
/
arteffect2.demo
/
rexx
/
fadeborder.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-04-28
|
1KB
|
53 lines
/*
Fade Border
Copyright © 1997 A. Pratsch
ArtEffect ARexx Script
*/
options results
address "ArtEffect"
requestnumber title '"Fade Border"' def 10 min 4 max 100 unit 'Pixel' prompt 'Size'
bordersize = result
/* get picture dimensions into pic.width & pic.height */
get stem pic. pictureinfo
/* outer polygon points */
x1 = 0
y1 = 0
x2 = pic.width
y2 = pic.height
/* inner polygon points */
ix1 = bordersize
iy1 = bordersize
ix2 = pic.width-bordersize
iy2 = pic.height-bordersize
/* fading border */
stencil all
palette rs 0 re 1
setcolor 0 0 0 reg 1
setcolor 255 255 255 reg 0
gradient = 'linear,alpha,256,0:'
/* top */
points = x1 y1 x2 y1 ix2 iy1 ix1 iy1
'polygon strength 100 gradient 'gradient'0,0,0,'bordersize points
/* bottom */
points = x1 y2 x2 y2 ix2 iy2 ix1 iy2
'polygon strength 100 gradient 'gradient'0,'y2',0,'iy2 points
/* left */
points = x1 y1 ix1 iy1 ix1 iy2 x1 y2
'polygon strength 100 gradient 'gradient'0,0,'ix1',0' points
/* right */
points = x2 y1 ix2 iy1 ix2 iy2 x2 y2
'polygon strength 100 gradient 'gradient || x2',0,'ix2',0' points